package xijia.plus.docs.thymeleafuser.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.ui.Model;
import xijia.plus.docs.thymeleafuser.service.ErrorService;
import xijia.plus.docs.thymeleafuser.util.IpUtil;

/**
 * 逻辑层，页面渲染数据获取处理
 *
 * @author wangsong
 * @version 1.0.0
 * @mail 1720696548@qq.com
 * @date 2022/10/20 0020 14:55
 */
@Service
@Slf4j
public class ErrorServiceImpl extends BaseServiceImpl implements ErrorService {


    @Override
    public void error404(Model model) {
        model.addAttribute("addrId", IpUtil.getIpAddr(request));
        //  Map<Integer, List<BtMenuVO>> menuMap = super.getTree();
        //  model.addAttribute(TpParamsKey.ADDR_ID, AddrUtil.getIpAddr(request));
//        model.addAttribute(TpParamsKey.BASE_URL, request.getRequestURL().toString().replace(request.getServletPath(), ""));
//        model.addAttribute(TpParamsKey.MENU_TOP, menuMap.get(1).get(0).getMenus());
//        model.addAttribute(TpParamsKey.MENU_BOTTOM, menuMap.get(2).get(0).getMenus());
    }
}
